package cn.tedu.csmall.stock.webapi.quartz; 
 /*
 @Time: 2023/3/30 17:31
 @Author:GShuai
 @File:RabbitStockConsumer.class
 @Software:IntelliJ IDEA
*/

import cn.tedu.csmall.commons.pojo.stock.model.StockTb;
import cn.tedu.csmall.stock.webapi.quartz.config.RabbitStockConfig;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = {RabbitStockConfig.STOCK_TB_QUEUE})
public class RabbitStockConsumer {

    @RabbitHandler
    public void getStock(StockTb stock){
        System.out.println("接受到的消息："+stock);
    }
}
